public class CompsitePattern {
    public static void main(String[] args) {
        Composite china = new Composite();
        china.add(new City(1000));// 直辖市-上海
        china.add(new City(2000));// 直辖市-北京

        Composite fujian = new Composite();
        fujian.add(new City(3000)); //厦门
        fujian.add(new City(4000)); //福州

        china.add(fujian); // 因为共同实现接口Counter，所以基类向下继承是Counter

        System.out.println(china.count());
        Object


    }
}
